<script setup lang="ts">
import type { ContentCollectionItem } from '@nuxt/content'
const route = useRoute()
const blog = ref<null|ContentCollectionItem|undefined >(null)
const id = route.params.id
const { data } = await useAsyncData(() => queryCollection('content').path('/'+id).first())
blog.value = data.value

</script>

<template>
  <div>blog</div>
  <ContentRenderer v-if="blog" :value="blog" :prose="true" class="blog-content"/>
</template>
